<!--登记表（整合 化缘）-->
<?php include('header.php') ?>

<div id="mainbody"  >
<div class="col-lg-9" id="charge">
    <table class="table table-bordered" id="work-table">
      <tr id="table-nav">
        <td> 日期</td>
        <td> 学号</td>
        <td> 姓名</td>
        <td> 学院</td>
        <td>开始时间</td>
        <td>工作内容</td>
        <td>结束时间</td>
        <td>用工小时</td>
        <td>教师确认</td>
        <td>备注</td>
        
      </tr>
      <?php 
        				$sql="select studentid,timebegin,timeend,(timeend-timebegin),teachid,notice,stationid from timecount order by timebegin asc";
        				$result=mysql_query($sql);
        				while ($row=mysql_fetch_row($result)){
        					$string1 = explode(' ',$row[1]); 
        					$string2 = explode(' ',$row[1]);
        					$string3 = explode('-',$string2[0]);
        					$string4 = explode(':',$string2[1]);
        					$string22 = explode(' ',$row[2]);
        					$string33 = explode('-',$string22[0]);
        					$string44 = explode(':',$string22[1]);
        					$time1 = mktime($string4[0],$string4[1],$string4[2],$string3[1],$string3[2],$string3[0]);
        					$time2 = mktime($string44[0],$string44[1],$string44[2],$string33[1],$string33[2],$string33[0]);
        					$diff = (double)(($time2-$time1)/3600);
                            number_format($diff,3);
        					?>
        					<tr>
        					<td><?php echo $string1[0] ?></td>
        				    <td><?php echo $row[0] ?></td>
        					<td><?php 
        						$sql1="select studentname from allstudent where allstudent.studentid='$row[0]'";
        						$result1=mysql_query($sql1);
        						$row1=mysql_fetch_row($result1);
        						echo $row1[0] ?>
        						</td>
        					<td><?php 
	        					$sql2="select college from allstudent where allstudent.studentid='$row[0]'";
	        					$result2=mysql_query($sql2);
	        					$row2=mysql_fetch_row($result2);
        						echo $row2[0] ?></td>
        					<td><?php
        						echo $row[1] ?></td>
        					<td><?php 
	        					$sql3="select stationname from station where station.stationid='$row[6]'";
	        					$result3=mysql_query($sql3);
	        					$row3=mysql_fetch_row($result3);
        						echo $row3[0] ?></td>
        					<td><?php echo $row[2] ?></td>
        					<td><?php echo $diff ?></td>
        					<td><?php 
	        					$sql4="select teachname from teach where teach.teachid='$row[4]'";
	        					$result4=mysql_query($sql4);
	        					$row4=mysql_fetch_row($result4);
	        					echo $row4[0] 
	        					?></td>
        					<td><?php echo $row[5] ?></td>
        					</tr>
        				<?php } ?>
        				<?php 
        				$sql="select studentid,timebegin,timeend,(timeend-timebegin),teachid,notice,stationid from bookmanage order by timebegin asc";
        				$result=mysql_query($sql);
        				while ($row=mysql_fetch_row($result)){
        					$string1 = explode(' ',$row[1]); 
        					$string2 = explode(' ',$row[1]);
        					$string3 = explode('-',$string2[0]);
        					$string4 = explode(':',$string2[1]);
        					$string22 = explode(' ',$row[2]);
        					$string33 = explode('-',$string22[0]);
        					$string44 = explode(':',$string22[1]);
        					$time1 = mktime($string4[0],$string4[1],$string4[2],$string3[1],$string3[2],$string3[0]);
        					$time2 = mktime($string44[0],$string44[1],$string44[2],$string33[1],$string33[2],$string33[0]);
        					$diff = (double)(($time2-$time1)/3600);
                            number_format($diff,3);
        					?>
        					<tr>
        					<td><?php echo $string1[0] ?></td>
        				    <td><?php echo $row[0] ?></td>
        					<td><?php 
        						$sql1="select studentname from allstudent where allstudent.studentid='$row[0]'";
        						$result1=mysql_query($sql1);
        						$row1=mysql_fetch_row($result1);
        						echo $row1[0] ?>
        						</td>
        					<td><?php 
	        					$sql2="select college from allstudent where allstudent.studentid='$row[0]'";
	        					$result2=mysql_query($sql2);
	        					$row2=mysql_fetch_row($result2);
        						echo $row2[0] ?></td>
        					<td><?php
        						echo $row[1] ?></td>
        					<td><?php 
	        					$sql3="select stationname from station where station.stationid='$row[6]'";
	        					$result3=mysql_query($sql3);
	        					$row3=mysql_fetch_row($result3);
        						echo $row3[0] ?></td>
        					<td><?php echo $row[2] ?></td>
        					<td><?php echo $diff ?></td>
        					<td><?php 
	        					$sql4="select teachname from teach where teach.teachid='$row[4]'";
	        					$result4=mysql_query($sql4);
	        					$row4=mysql_fetch_row($result4);
	        					echo $row4[0] 
	        					?></td>
        					<td><?php echo $row[5] ?></td>
        					</tr>
        				<?php } ?>
        				<?php 
        				$sql="select studentid,timebegin,timeend,(timeend-timebegin),teachid,notice,stationid from computebysize order by timebegin asc";
        				$result=mysql_query($sql);
        				while ($row=mysql_fetch_row($result)){
        					$string1 = explode(' ',$row[1]); 
        					$string2 = explode(' ',$row[1]);
        					$string3 = explode('-',$string2[0]);
        					$string4 = explode(':',$string2[1]);
        					$string22 = explode(' ',$row[2]);
        					$string33 = explode('-',$string22[0]);
        					$string44 = explode(':',$string22[1]);
        					$time1 = mktime($string4[0],$string4[1],$string4[2],$string3[1],$string3[2],$string3[0]);
        					$time2 = mktime($string44[0],$string44[1],$string44[2],$string33[1],$string33[2],$string33[0]);
        					$diff = (double)(($time2-$time1)/3600);
                            number_format($diff,3);
        					?>
        					<tr>
        					<td><?php echo $string1[0] ?></td>
        				    <td><?php echo $row[0] ?></td>
        					<td><?php 
        						$sql1="select studentname from allstudent where allstudent.studentid='$row[0]'";
        						$result1=mysql_query($sql1);
        						$row1=mysql_fetch_row($result1);
        						echo $row1[0] ?>
        						</td>
        					<td><?php 
	        					$sql2="select college from allstudent where allstudent.studentid='$row[0]'";
	        					$result2=mysql_query($sql2);
	        					$row2=mysql_fetch_row($result2);
        						echo $row2[0] ?></td>
        					<td><?php
        						echo $row[1] ?></td>
        					<td><?php 
	        					$sql3="select stationname from station where station.stationid='$row[6]'";
	        					$result3=mysql_query($sql3);
	        					$row3=mysql_fetch_row($result3);
        						echo $row3[0] ?></td>
        					<td><?php echo $row[2] ?></td>
        					<td><?php echo $diff ?></td>
        					<td><?php 
	        					$sql4="select teachname from teach where teach.teachid='$row[4]'";
	        					$result4=mysql_query($sql4);
	        					$row4=mysql_fetch_row($result4);
	        					echo $row4[0] 
	        					?></td>
        					<td><?php echo $row[5] ?></td>
        					</tr>
        				<?php } ?>
        				<?php 
        				$sql="select studentid,timebegin,timeend,(timeend-timebegin),teachid,notice,stationid from newspapers order by timebegin asc";
        				$result=mysql_query($sql);
        				while ($row=mysql_fetch_row($result)){
        					$string1 = explode(' ',$row[1]); 
        					$string2 = explode(' ',$row[1]);
        					$string3 = explode('-',$string2[0]);
        					$string4 = explode(':',$string2[1]);
        					$string22 = explode(' ',$row[2]);
        					$string33 = explode('-',$string22[0]);
        					$string44 = explode(':',$string22[1]);
        					$time1 = mktime($string4[0],$string4[1],$string4[2],$string3[1],$string3[2],$string3[0]);
        					$time2 = mktime($string44[0],$string44[1],$string44[2],$string33[1],$string33[2],$string33[0]);
        					$diff = (double)(($time2-$time1)/3600);
                            number_format($diff,3);
        					?>
        					<tr>
        					<td><?php echo $string1[0] ?></td>
        				    <td><?php echo $row[0] ?></td>
        					<td><?php 
        						$sql1="select studentname from allstudent where allstudent.studentid='$row[0]'";
        						$result1=mysql_query($sql1);
        						$row1=mysql_fetch_row($result1);
        						echo $row1[0] ?>
        						</td>
        					<td><?php 
	        					$sql2="select college from allstudent where allstudent.studentid='$row[0]'";
	        					$result2=mysql_query($sql2);
	        					$row2=mysql_fetch_row($result2);
        						echo $row2[0] ?></td>
        					<td><?php
        						echo $row[1] ?></td>
        					<td><?php 
	        					$sql3="select stationname from station where station.stationid='$row[6]'";
	        					$result3=mysql_query($sql3);
	        					$row3=mysql_fetch_row($result3);
        						echo $row3[0] ?></td>
        					<td><?php echo $row[2] ?></td>
        					<td><?php echo $diff ?></td>
        					<td><?php 
	        					$sql4="select teachname from teach where teach.teachid='$row[4]'";
	        					$result4=mysql_query($sql4);
	        					$row4=mysql_fetch_row($result4);
	        					echo $row4[0] 
	        					?></td>
        					<td><?php echo $row[5] ?></td>
        					</tr>
        				<?php } ?>
        				<?php 
        				$sql="select studentid,timebegin,timeend,(timeend-timebegin),teachid,notice,stationid from roommanage order by timebegin asc";
        				$result=mysql_query($sql);
        				while ($row=mysql_fetch_row($result)){
        					$string1 = explode(' ',$row[1]); 
        					$string2 = explode(' ',$row[1]);
        					$string3 = explode('-',$string2[0]);
        					$string4 = explode(':',$string2[1]);
        					$string22 = explode(' ',$row[2]);
        					$string33 = explode('-',$string22[0]);
        					$string44 = explode(':',$string22[1]);
        					$time1 = mktime($string4[0],$string4[1],$string4[2],$string3[1],$string3[2],$string3[0]);
        					$time2 = mktime($string44[0],$string44[1],$string44[2],$string33[1],$string33[2],$string33[0]);
        					$diff = (double)(($time2-$time1)/3600);
                            number_format($diff,3);
        					?>
        					<tr>
        					<td><?php echo $string1[0] ?></td>
        				    <td><?php echo $row[0] ?></td>
        					<td><?php 
        						$sql1="select studentname from allstudent where allstudent.studentid='$row[0]'";
        						$result1=mysql_query($sql1);
        						$row1=mysql_fetch_row($result1);
        						echo $row1[0] ?>
        						</td>
        					<td><?php 
	        					$sql2="select college from allstudent where allstudent.studentid='$row[0]'";
	        					$result2=mysql_query($sql2);
	        					$row2=mysql_fetch_row($result2);
        						echo $row2[0] ?></td>
        					<td><?php
        						echo $row[1] ?></td>
        					<td><?php 
	        					$sql3="select stationname from station where station.stationid='$row[6]'";
	        					$result3=mysql_query($sql3);
	        					$row3=mysql_fetch_row($result3);
        						echo $row3[0] ?></td>
        					<td><?php echo $row[2] ?></td>
        					<td><?php echo $diff ?></td>
        					<td><?php 
	        					$sql4="select teachname from teach where teach.teachid='$row[4]'";
	        					$result4=mysql_query($sql4);
	        					$row4=mysql_fetch_row($result4);
	        					echo $row4[0] 
	        					?></td>
        					<td><?php echo $row[5] ?></td>
        					</tr>
        				<?php } ?>
        				
        				
        				
     
       
     
  
   </table>

